module RComp
    module DotNet
        class Option
            def initialize(name, value=nil, prefix="/", separator=":")
                @prefix = prefix
                @separator = separator
                @name = name
                @value = value
            end

            def add?
                true
            end

            def to_s
                @value ? "#{@prefix}#{@name}#{@separator}#{@value}" : "#{@prefix}#{@name}"
            end
        end

        class ConditionalOption < Option
            def add?
                @value
            end
        end

        class ToggleOption < Option
            def to_s
                "#{@prefix}#{@name}"
            end

            def add?
                @value
            end
        end
    end
end
